﻿// <copyright file="MessageType.cs" company="Hallvard Korsgaard">
//  Microsoft Public License (Ms-PL). See license details here: http://enoceannet.codeplex.com/license
// </copyright>
// <author>Hallvard Korsgaard</author> 

namespace EnOcean.Message
{
  using System;

  /// <summary>
  /// Represents the value in the ORG byte.
  /// </summary>
  [Serializable]
  public enum MessageType : byte
  {
    /// <summary>
    /// An INF_INIT message.
    /// </summary>
    InformInit = 0x89,
    
    /// <summary>
    /// A OK message.
    /// </summary>
    Ok = 0x58,

    /// <summary>
    /// An INF_IDBASE message.
    /// </summary>
    InformIdBase = 0x98,

    /// <summary>
    /// An Err message.
    /// </summary>
    Error = 0x19,

    /// <summary>
    /// An INF_RX_SENSITIVITY message.
    /// </summary>
    InformRadioSensitivity = 0x88,

    /// <summary>
    /// An INF_MODEM_STATUS message.
    /// </summary>
    InformModemStatus = 0xA8,
    
    /// <summary>
    /// An INF_SW_VER message.
    /// </summary>
    InformSoftwareVersion = 0x8C,

    /// <summary>
    /// An ERR_MODEM_NOTWANTEDACK message.
    /// </summary>
    AcknowledgeNotWantedError = 0x28,

    /// <summary>
    /// An ERR_MODEM_NOTACK message.
    /// </summary>
    NoAcknowledgeError = 0x29,

    /// <summary>
    /// An ERR_MODEM_DUP_ID message.
    /// </summary>
    DuplicateModemIdError = 0x0C,

    /// <summary>
    /// An ERR_TX_IDRANGE message.
    /// </summary>
    TelegramIdOutOfRangeError = 0x22,
    
    /// <summary>
    /// An ERR_ IDRANGE message.
    /// </summary>
    IdOutOfRangeError = 0x1A,
    
    /// <summary>
    /// An ERR_SYNTAX in the H_SEQ field.
    /// </summary>
    HseqError = 0x08,
    
    /// <summary>
    /// An ERR_SYNTAX in the LENGTH field.
    /// </summary>
    LengthError = 0x09,

    /// <summary>
    /// An ERR_SYNTAX in the CHKSUM field.
    /// </summary>
    ChecksumError = 0x0A,

    /// <summary>
    /// An ERR_SYNTAX in the ORG field.
    /// </summary>
    OrgError = 0x0B
  }
}
